Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

264
Vistas
Discord.js v12 | Delete invites from server

I would my bot to delete invites created on my server with a command. I know I can take all invites with message.guild.fetchInvites().then(), but how do I make my lambda to delete all invites? Thank you in advance and excuse me If it is a dumb question!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You started off well, but here is how to loop through them all and delete them one by one:

message.guild.invites.fetch().then(invites => {
  invites.each(i => i.delete())
})

Warning: If there are a lot of invites, you may get ratelimited. You can add a "sleep" function to fix this

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda